import { createApp } from "vue";
import EssayApp from "./EssayApp.vue";
// import "src/utils/mouseClick.js"

//代码高亮文件引入
import hljs from "highlight.js";
//样式文件,这里我选的是sublime样式，文件里面还有其他样式可供选择
import "highlight.js/styles/atom-one-light.css";

const app = createApp(EssayApp);
if(process.env.NODE_ENV === 'pro'){
  console.log = function(){};
}
app.directive("highlight", function (el) {
  const blocks = el.querySelectorAll("pre code");
  blocks.forEach((block) => {
    hljs.highlightBlock(block);
  });
});
app.mount("#app");
